// pages/techs/techs.js
var com = require("../../utils/comm.js")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrls: [
      '/images/manage/top-1.jpg',
      '/images/manage/top-2.jpg',
      '/images/manage/top-3.jpg',
    ],
    indicatorDots: false,
    autoplay: false,
    interval: 3000,
    duration: 800,
    showView: true,

    
  },

  techsadd: function (e) {
    console.log("com.authjust()=" + com.authjust(1))
    com.authjust(1)
    var x = com.authjust(1);
    if (x) {
      wx.navigateTo({
        url: '/pages/techsadd/techsadd',
      })
    } else {
    }
  },

  techslist: function (e) {
    console.log("com.authjust()=" + com.authjust(1))
    com.authjust(1)
    var x = com.authjust(1);
    if (x) {
      wx.navigateTo({
        url: '/pages/techslist/techslist',
      })
    } else {
    }
  },

  customeradd: function() {
    console.log("com.authjust()=" + com.authjust(1))
    com.authjust(1)
    var x = com.authjust(1);
    if (x) {
      wx.navigateTo({
        url: '/pages/techsadd/customadd/customadd',
      })
    } else {
    }
  },

  techsstatis: function(){
    var x = com.authjust(2);
    if (x) {
      wx.navigateTo({
        url: '/pages/techs/techsstatis/techsstatis',
      })
    } else {
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var admin = wx.getStorageSync("usertype");
    this.setData({
      admin: admin
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})